import upload from '@/utils/upload'
import request from '@/utils/request'

// export function updateUserPwd(oldPassword, newPassword) {
//   const data = {
//     oldPassword,
//     newPassword
//   }
//   return request({
//     url: '/system/user/profile/updatePwd',
//     method: 'put',
//     params: data
//   })
// }
// 请购管理
export function lvDoList(data) {
  return request({
    url: '/lvDo/lvDo/list',
    method: 'get',
	params: data
  })
}
// 报工记录
export function listAndParent(data) {
  return request({
    url: '/goodsSaledoGongxuUserMoney/goodsSaledoGongxuUserMoney/list',
    method: 'get',
	params: data
  })
}
// 详细报工记录
export function listAndParentList(data) {
  return request({
    url: '/goodsSaledoGongxuUserMoney/goodsSaledoGongxuUserMoney/listAndParent',
    method: 'get',
	params: data
  })
}
// 质检
export function editZhijian(data) {
  return request({
    url: '/goodsSaledoGongxuUserMoney/goodsSaledoGongxuUserMoney/editZhijian',
    method: 'get',
	params: data
  })
}

// 请购明细
export function goodsSaledoDetil(data) {
  return request({
    url: '/goodsSaledo/goodsSaledo/list',
    method: 'get',
	params: data
  })
}
// 发票列表
export function goodsInvoiceList(data) {
  return request({
    url: '/goodsInvoice/goodsInvoice/list',
    method: 'get',
	params: data
  })
}
// 发票审核
export function listassessStatus(data) {
  return request({
    url: '/payApply/payApply/list',
    method: 'get',
	params: data
  })
}
// 申请付款详情
export function payApplyDetil(data) {
  return request({
    url: '/payApply/payApply/' + data,
    method: 'get',
	params: data
  })
}
// 发票审核修改
export function payApplyEdit(data) {
  return request({
    url: '/payApply/payApply/edit',
    method: 'put',
	data: data
  })
}
// 查询付款记录
export function payRecordList(data) {
  return request({
    url: '/payRecord/payRecord/list',
    method: 'get',
	params: data
  })
}
// 付款详情查询
export function payRecord(data) {
  return request({
    url: '/payRecord/payRecord/' + data,
    method: 'get',
	params: data
  })
}
export function lvBuyList(data) {
  return request({
    url: '/goodsSalebuyall/goodsSalebuyall/list',
    method: 'get',
	params: data
  })
}
// 查询到货记录
export function lvDaohuoList(data) {
  return request({
    url: '/lvDaohuo/lvDaohuo/list',
    method: 'get',
	params: data
  })
}
// 到货明细查询
export function lvDaohuoDetail(data) {
  return request({
    url: '/lvDaohuoDetail/lvDaohuoDetail/list',
    method: 'get',
	params: data
  })
}
// 查询入库记录
export function goodsSalebuyallList(data) {
  return request({
    url: '/goodsSalebuyall/goodsSalebuyall/list',
    method: 'get',
	params: data
  })
}
// 查询发货记录
export function lvYifahuomingxilList(data) {
  return request({
    url: '/lvYifahuomingxi/lvYifahuomingxi/list',
    method: 'get',
	params: data
  })
}
// 查询供应商收支记录
export function goodsSupplierList(data) {
  return request({
    url: '/goodsSupplier/goodsSupplier/list',
    method: 'get',
	params: data
  })
}
// 供应商收支明细
export function paySupplierBalanceList(data) {
  return request({
    url: '/paySupplierBalance/paySupplierBalance/list',
    method: 'get',
	params: data
  })
}
// 查询所有分配任务列表
export function goodsSaledoGongxuUserList(data) {
  return request({
    url: '/goodsSaledoGongxuUser/goodsSaledoGongxuUser/list',
    method: 'get',
	params: data
  })
}
// 报工
export function goodsSaledoGongxuUserMoney(data) {
  return request({
    url: '/goodsSaledoGongxuUserMoney/goodsSaledoGongxuUserMoney',
    method: 'get',
	params: data
  })
}
// 查询报工详情
export function goodsSaledoGongxuUserMoneyInfo(data) {
  return request({
    url: '/goodsSaledoGongxuUserMoney/goodsSaledoGongxuUserMoney/' + data,
    method: 'get',
  })
}
// 报工提交
export function addBaogong(data) {
  return request({
    url: '/goodsSaledoGongxuUserMoney/goodsSaledoGongxuUserMoney/addBaogong',
    method: 'post',
	data: data
  })
}
// 报工记录列表
export function goodslistAndParent(data) {
  return request({
    url: '/goodsSaledoGongxuUserMoney/goodsSaledoGongxuUserMoney/listAndParent',
    method: 'get',
	params: data
  })
}
// 删除报工
export function removeUpdate(data) {
  return request({
    url: '/goodsSaledoGongxuUserMoney/goodsSaledoGongxuUserMoney/removeUpdate/' + data,
    method: 'DELETE',
  })
}

// 项目查询
export function projectList(data) {
  return request({
    url: '/project/project/list',
    method: 'get',
	params: data
  })
}
// 销售订单查询
export function projectBaseInfoList(data) {
  return request({
    url: '/projectBaseInfo/projectBaseInfo/list',
    method: 'get',
	params: data
  })
}
// 销售订单详情查询
export function projectBaseInfo(data) {
  return request({
    url: '/projectBaseInfo/projectBaseInfo/' + data,
    method: 'get',
  })
}
// 订单选择的产品
export function goodsSaleList(data) {
  return request({
    url: '/goodsSale/goodsSale/list',
    method: 'get',
	params: data
  })
}

// 巡检详情
export function goodsSaledoGongxuUsersMoneyInfo(data) {
  return request({
    url: '/goodsSaledoGongxuUserMoney/goodsSaledoGongxuUserMoney/' + data,
    method: 'get',
  })
}
// 巡检提交
export function goodsSaleEdit(data) {
  return request({
    url: '/goodsSale/goodsSale/edit',
    method: 'get',
	params: data
  })
}
// 上传过磅单
export function lvDaohuoUpdate(data) {
  return request({
    url: '/lvDaohuo/lvDaohuo/edit',
    method: 'put',
	data: data
  })
}
// 入库审核列表
export function goodsOrderInList(data) {
  return request({
    url: '/goodsOrderIn/goodsOrderIn/assessList',
    method: 'get',
	params: data
  })
}
// 入库审核通过
export function goodsOrderInEdit(data) {
  return request({
    url: '/goodsOrderIn/goodsOrderIn/assess',
    method: 'put',
	data: data
  })
}
// 确定打款
export function payRecordPayAdd(data) {
  return request({
    url: '/payRecord/payRecord/payAdd',
    method: 'post',
	data: data
  })
}
// 发货管理列表
export function lvYifahuoList(data) {
  return request({
    url: '/lvYifahuo/lvYifahuo/list',
    method: 'get',
	params: data
  })
}
// 发货单审核通过
export function lvYifahuoShenhetongguo(data) {
  return request({
    url: '/lvYifahuo/lvYifahuo/shenhetongguo/' + data,
    method: 'DELETE',
  })
}
// 发货单申请驳回
export function lvYifahuoBohui(data) {
  return request({
    url: '/lvYifahuo/lvYifahuo/bohui',
    method: 'put',
    data: data
  })
}
// 审计不同意
export function payApplyAudit(data) {
  return request({
    url: '/payApply/payApply/audit',
    method: 'put',
    data: data
  })
}
// 批量审计
export function payApplyAuditBatch(data) {
  return request({
    url: '/payApply/payApply/auditBatch',
    method: 'POST',
    params: data
  })
}
// 批量审核
export function payApplyAssessBatch(data) {
  return request({
    url: '/payApply/payApply/assessBatch',
    method: 'POST',
    params: data
  })
}

//采购管理
export function LvBuylvBuyList(data) {
  return request({
    url: '/lvBuy/lvBuy/list',
    method: 'get',
    params: data
  })
}
// 申请付款
export function payApplyAddForUnion(data) {
  return request({
    url: '/payApply/payApply/addForUnion',
    method: 'post',
    data: data
  })
}
// 申请付款
export function payApplyAddForDeposit(data) {
  return request({
    url: '/payApply/payApply/addForDeposit',
    method: 'post',
    data: data
  })
}
// 采购明细
export function generateMoneyList(data) {
  return request({
    url: '/payApply/payApply/generateMoneyList',
    method: 'get',
    params: data
  })
}
// 数据字典
export function dictType(data) {
  return request({
    url: '/system/dict/data/list',
    method: 'get',
    params: data
  })
}
// 终审通过
export function payApplyAssess(data) {
  return request({
    url: '/payApply/payApply/assess',
    method: 'put',
	data: data
  })
}
// 到货过磅单
export function editGuobangdan(data) {
  return request({
    url: '/lvYifahuo/lvYifahuo/editGuobangdan',
    method: 'put',
	data: data
  })
}
// 上传到货回执
export function daohuohuizhi(data) {
  return request({
    url: '/lvYifahuo/lvYifahuo/daohuohuizhi',
    method: 'put',
	data: data
  })
}
// 入库明细记录
export function lvRukumingxiList(data) {
  return request({
    url: '/lvRukumingxi/lvRukumingxi/list',
    method: 'get',
	data: data
  })
}
// 到货产品
export function lvDaohuoDetailList(data) {
  return request({
    url: '/lvDaohuoDetail/lvDaohuoDetail/list',
    method: 'get',
	params: data
  })
}
// 数据字典批量查询
export function typesBatch(data) {
  return request({
    url: '/system/dict/data/typesBatch',
    method: 'post',
	data: data
  })
}
// 处理数字字典
export function dictDispose(list,status) {
	const statusItem = list.find(items => items.dictValue === status);
	console.log(statusItem,'这是什么')
	return statusItem ? statusItem.dictLabel : '未知状态';
}